package org.lagou.service.impl;

import org.apache.dubbo.config.annotation.Service;
import org.lagou.service.HelloService;

import java.util.concurrent.TimeUnit;

/**
 * @author junbao
 */
@Service
public class HelloServiceImpl implements HelloService {

    @Override
    public String sayHello(String name, int timeToWait) {
        try {
            Thread.sleep(timeToWait);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
//        try {
//            TimeUnit.SECONDS.sleep(1);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        return "hello:" + name;
    }
}
